﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Singleton
{
    class Program
    {
        static void Main(string[] args)
        {
            Singleton1 a = Singleton1.Instance;
            Singleton1 b = Singleton1.Instance;

            Console.WriteLine(object.ReferenceEquals(a,b));

            Singleton2 x = Singleton2.Instance;
            Singleton2 y = Singleton2.Instance;

            Console.WriteLine(object.ReferenceEquals(x, y));

            Console.ReadKey();
        }
    }
}
